import Mock from 'mockjs'

// 用户登录mock
Mock.mock('/api/login', 'post', {
  code: 200,
  data: {
    token: Mock.Random.guid(),
    username: Mock.Random.cname()
  }
})

// 获取用户信息mock
Mock.mock('/api/userinfo', 'get', {
  code: 200,
  data: {
    id: Mock.Random.id(),
    name: Mock.Random.cname(),
    roles: ['admin']
  }
})

export default Mock